package com.hmall.user.server.Impl;

import com.hmall.user.Address;
import com.hmall.user.mapper.AdderMapper;
import com.hmall.user.server.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {

    @Autowired(required = false)
    private AdderMapper adderMapper;
    /**
     * 根据id查询地址
     * @param id
     * @return
     */
    @Override
    public List<Address> selectById(Long id) {
        return adderMapper.selectList(id);
    }

    /**
     * 根据addressId 查询Address
     * @param addressId
     * @return
     */
    @Override
    public Address selectAddressById(Long addressId) {

        return adderMapper.selectById(addressId);
    }
}
